package dfbz.homework1;

public class Test03 {
    public static void main(String[] args) {
        int length=20;
        int width=8;
        int zc=getPerimeter(length,width);
        System.out.println("周长为:"+zc);
        int area=getArea(length,width);
        System.out.println("面积为:"+area);
    }
   // 定义getPerimeter方法用于计算矩形的周长,参数为(int length, int width),返回值为int类型
    public static int getPerimeter(int length, int width){
        return  (length + width) * 2;
    }
    public static int getArea(int length, int width){
        return  length*width;
    }


}
